﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="GetAllEbook.ascx.cs" Inherits="NLLSite.UserControl.GetAllEbook" %>

<asp:LinqDataSource ID="LinqDataSource1" runat="server" 
    ContextTypeName="DAL_Class.NLLDataContext" 
    Select="new (ID, Title, ImageUrl, Description, FileUrl)" TableName="Ebooks">
</asp:LinqDataSource>
<asp:ListView ID="ListView1" runat="server" DataSourceID="LinqDataSource1" 
    EnableModelValidation="True">
    
    <EmptyDataTemplate>
        <span>Chưa có tài liệu nào được chia sẻ.</span>
    </EmptyDataTemplate>
    
    <ItemTemplate>
    <div class="box-center-item-tin" >
                                	<a href="#" style="float: left; margin-right: 10px; margin-bottom: 10px;">
                                	<img height="100px" width="130px" style="border: 1px solid rgb(204, 204, 204); padding: 1px;" src="<%# Eval("ImageUrl") %>"  >
                                        	</a><a href="#"><b><%# Eval("Title")%></b></a>
                                            <p style="text-align: justify;"><%# Eval("Description")%></p>
                                            <p style="text-align:justify;">
                                            <a href="/download/<%#ConvertToUnSign(DataBinder.Eval(Container.DataItem, "Title").ToString())%>/chia-se/<%#GetFile(DataBinder.Eval(Container.DataItem, "FileUrl").ToString())%>">
                                                <img alt="" src="/Templates/Images/download.png" style="border:0px"/></a>
                                               </p>
	                                </div>
    <div class="clr"></div>
        <%--<span style="">ID:
        <asp:Label ID="IDLabel" runat="server" Text='<%# Eval("ID") %>' />
        <br />
        Title:
        <asp:Label ID="TitleLabel" runat="server" Text='<%# Eval("Title") %>' />
        <br />
        ImageUrl:
        <asp:Label ID="ImageUrlLabel" runat="server" Text='<%# Eval("ImageUrl") %>' />
        <br />
        Description:
        <asp:Label ID="DescriptionLabel" runat="server" 
            Text='<%# Eval("Description") %>' />
        <br />
        FileUrl:
        <asp:Label ID="FileUrlLabel" runat="server" Text='<%# Eval("FileUrl") %>' />
        <br />
<br /></span>--%>
    </ItemTemplate>
    <LayoutTemplate>
        <div ID="itemPlaceholderContainer" runat="server" style="">
            <span runat="server" id="itemPlaceholder" />
        </div>
        <div style="">
            <asp:DataPager ID="DataPager1" runat="server">
                <Fields>
                    <asp:NextPreviousPagerField ButtonType="Image" ShowFirstPageButton="True" 
                        ShowNextPageButton="False" ShowPreviousPageButton="False" FirstPageText="Trang đầu" LastPageText="Trang cuối" NextPageText="Sau" PreviousPageText="Trước" FirstPageImageUrl="../Templates/Images/start.gif" LastPageImageUrl="../Templates/Images/end.gif" NextPageImageUrl="../Templates/Images/next.gif" PreviousPageImageUrl="../Templates/Images/previous.gif" />
                    <asp:NumericPagerField />
                    <asp:NextPreviousPagerField ButtonType="Image" ShowLastPageButton="True" 
                        ShowNextPageButton="False" ShowPreviousPageButton="False" FirstPageText="Trang đầu" LastPageText="Trang cuỗi" NextPageText="Sau" PreviousPageText="Trước" FirstPageImageUrl="../Templates/Images/start.gif" LastPageImageUrl="../Templates/Images/end.gif" NextPageImageUrl="../Templates/Images/next.gif" PreviousPageImageUrl="../Templates/Images/previous.gif" />
               </Fields>
            </asp:DataPager>
        </div>
    </LayoutTemplate>
    
</asp:ListView>

